GraphQL Schema
標準の拡張子は.graphql
defaultでnullable
String!のように!を付けることでnull非許容になる
『初めてのGraphQL』 4章
#??
Schemas and Types | GraphQL
Learn
Introduction
Schemas and Types
Queries
Mutations
Subscriptions
Validation
Execution
Response
Introspection
Best Practices
Best Practices
Thinking in Graphs
Serving over HTTP
Authorization
Pagination
Schema Design
Global Object Identification
Caching
Performance
Security
Federation
GraphQL ServerのCode frist→ Schema first→ Code firstの遍歴
https://github.com/vvakame/graphql-schema-guide
キーワード
引数
エイリアス
同じクエリを同時に参照できないので、別名を与える
フラグメント
関数のように同じデータの指定をまとめられる
操作名query hogehoge
変数
code:graphql
query ($login: String!) { # !はnullにならないことを示す
user(login: $login) {
bio
name
}
}
mutaion
データの更新をする
型
!: Not Null
ブラウザ上でGraphQLのスキーマ見れるやつ
https://apis.guru/graphql-voyager/